<?php
session_start();
require 'login_reg.php';
require 'photo_uploader.php';
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


if (isset($_POST['ChangePhotoClick'])){
    
    
    //$reg = new login_reg();
    $ph = new photo_uploader();

    $ph->upload_profpic($_SESSION['Username'], $_FILES['PhotoChooser']);
    $ph->set_profpic_id($_SESSION['Username'], $ph->photo_id);
    header('Location: ../changeprofile.php?photo=1');

    
}

?>
